

namespace Orz.LogManager
{
	
	///
	/// <summary>
	/// A common interface for tailing a data source.
	/// </summary>
	/// <remarks>
	/// This interface defines a simple set of commands for manipulating a stream
	/// of data.  The most useful one will be <code>ReadToEnd</code> which will provide
	/// a method to get any new data since the last read.
	/// </remarks>
	///
	public interface ILogManagerStream
	{
		///
		/// <summary>
		/// Positions the next read at the start of the data stream if possible.
		/// </summary>
		/// <remarks>
		/// It may not be possible to return to the start of the data stream if it is
		/// not buffered.  In this case, the method will have no effect.
		/// </remarks>
		///
		void SeekToStart();
		
		///
		/// <summary>
		/// Positions the next read at the end of the data stream.
		/// </summary>
		/// <remarks>
		/// Any data that has not yet been read will be skipped.
		/// </remarks>
		///
		void SeekToEnd();

		///
		/// <summary>
		/// Returns any data from the point of the last read to the end of the stream.
		/// </summary>
		///
		string ReadToEnd();
		
		
		///
		/// <summary>
		/// Closes the data stream.
		/// </summary>
		///
		void Close();
	}
}
